<!--交易记录-->

<template>
	<div>
		<div class="my_header">
			<i class="mui-icon mui-icon-arrowleft" aria-hidden="true" @click="$router.back(-1)"></i>
			<div class="top1">账户安全</div>
			
		</div>
		<div class="jyrecord">			
			<div class="row" @click="setpwd">
				
				<div class="left">登录密码</div>
				<div class="right bindcolor"  v-show="password!='未设置'">已设置<img src="static/imgs/icon_more.png"></div>
				<div class="right" v-show="password=='未设置'">未设置<img src="static/imgs/icon_more.png"></div>
			
			</div>
			<div class="row" @click="setPaypwd">
				<!-- <router-link to="/editepaypwd"> -->
				<div class="left">支付密码</div>
				<div class="right" v-show="paypwdstate=='未设置'">未设置<img src="static/imgs/icon_more.png"></div>
				<div class="right bindcolor" v-show="paypwdstate!='未设置'">已设置<img src="static/imgs/icon_more.png"></div>
				<!-- </router-link> -->
			</div>
      <!--			<div class="row">
                      <router-link to="/bindphone">
                      <div class="left">绑定手机号</div>
                      <div class="right bindcolor" v-show="is_mobile!='未绑定'">已绑定<img src="static/imgs/icon_more.png"></div>
                      <div class="right" v-show="is_mobile=='未绑定'">未绑定<img src="static/imgs/icon_more.png"></div>
                      </router-link>
                  </div>-->

	<!--		<div class="row">
				<div class="left">绑定QQ</div>
				<div class="right">已绑定<img src="static/imgs/icon_more.png"></div>
			</div>-->
			<!--<div class="row">
				<div class="left">绑定微信</div>
				<div class="right">已绑定<img src="static/imgs/icon_more.png"></div>
			</div>-->
		</div>
		
	</div>
	
</template>

<script>
	export default {
		data() {
			return {
				//查询动态
				password: '未设置',
				is_mobile: '未绑定',
				is_qq: '未绑定',
				is_weixin: '未绑定',
				paypwdstate: '已设置',
			}
		},
		beforeCreate: function() {
			var that = this;
			var token = localStorage.getItem("token");
			$.ajax({
				type: "get",
				url: "http://zcapi.hrgsxt.cn/api/User_safe/index",
				data: {
					token: token
				},
				cache: false,
				dataType: "json",
				success: function(data) {
          console.log('>>>>>>', data);
					    that.password = data.data.password,
						that.is_mobile = data.data.is_mobile,
						that.is_qq = data.data.is_qq,
						that.is_weixin = data.data.is_weixin,
						that.paypwdstate = data.data.pay_pwd
				}
			});
		},
		methods:{
			// 设置登录密码跳转
			setpwd(){
				var that=this;
               that.$router.replace({
					path:'./setpwd',
					query:{
						pwd:that.password
					}
					
				});
			},
			// 设置支付密码跳转
			setPaypwd(){
					var that=this;
               that.$router.replace({
					path:'./editepaypwd',
					query:{
						paypwd:that.paypwdstate
					}
					
				});
			}
		}
	}
	
	
	
</script>

<style scoped>
	/*头部*/
		.my_header {
		height: .88rem;
		background: rgba(0, 133, 240, 1);
		text-align: center;
		color: #fff;
		line-height: .88rem;
		position: relative;
		padding: 0 .3rem;
	}
	

	.bindcolor{
		color: #0085F0 !important;
	}
	.my_header i {
		font-size: .4rem;
		float: left;
		line-height: .88rem;
	}
	
	 .my_header .top1 {
		width: 40%;
		margin-left: 25%;
		float: left;
		text-align: center;
	}
	

	
	/*查询记录*/
	.jyrecord{
		margin-top: 0px !important;
		width: 100%;
		font-size:0.26rem !important;
	    background-color: #FFFFFF;
		
	}

	.jyrecord .row {
		width: 100%;
		height: 0.88rem;
		background-color: #FFFFFF;
		line-height: 0.88rem;
		padding: 0px 0.3rem 0px 0.3rem;
		border-bottom: 1px solid #EFEFEF;		
	}
	
	.jyrecord .row:first-child {
		border-bottom: 1px solid #efefef;
	}
	
	.jyrecord .row .left {
		width: 50%;
		float: left;
		font-size: 0.30rem;
		color: #333333;
	}
	
	.jyrecord .row .right {
		color: #666666;
		width: 50%;
		float: right;
		font-size: 0.26rem;
		line-height: 0.88rem;
		text-align: right;
	}
	
	.jyrecord .row .right img {
		width: 0.14rem;
		height: 0.24rem;
		vertical-align: middle;
		margin-left: 7px;
		margin-bottom: 3px;
	}
	
	.jyrecord .row .right input {
		border: none;
		outline: none;
		text-indent: 4em;
		text-align: right;
		padding-right: 0px !important;
	}
	
</style>
